package com.building18.configs;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.Contact;

/**
 * 使用Knife4j swagger3
 */
@Configuration
@EnableKnife4j
public class SwaggerConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("Building 接口文档")
                        .version("1.0")
                        .description("Building 项目接口")
                        .contact(new Contact()
                                .name("微水")
                                .url("http://www.woniuxy.com")
                                .email("1378956327@qq.com")));
    }
}